<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>多个请求使用同一个Servlet</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

  </head>
  
  <body>
   	<h1>如果JSP中一个请求对应一个Servlet那要建很多Servlet，代码冗余较多。</h1>
	<h1>我们可以把一个模块的请求封装在一个Servlet，实现功能的模块化，从而简化代码。</h1>
   
   
   	
   	<!-- <a href="NewsServlet?method=add">Add</a>
    <a href="NewsServlet?method=query">Query</a>
    <a href="NewsServlet?method=delete">Delete</a>	
   	<a href="NewsServlet?method=update">Update</a>	 -->
   	
   	
   	<%-- <a href="${pageContext.request.contextPath }/addCategory.action">Add</a>
    <a href="${pageContext.request.contextPath }/deleteCategory.action">Query</a>
    <a href="${pageContext.request.contextPath }/updateCategory.action">Delete</a>	
   	<a href="${pageContext.request.contextPath }/queryCategoryList.action">Update</a> --%>
   	
   	<form action="${pageContext.request.contextPath }/add_Category.action" method="post">
   		<p>新闻分类名称：<input type="text" name="categoryname"/></p>
   		<p>
   			<input type="submit" value="提交" />
   		</p>
   	</form>
   	
   	
   	
   	<a href="http://localhost:8080/news/download/北大青鸟JAVA6.0FLASH.mp4" target="_blank">北大青鸟JAVA6.0FLASH.mp4</a>
   	
   	
  </body>
</html>
